﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Adams.Admin.Business.EidPrayers
{
    public static class CreateLocation
    {
        public static Adams.Admin.DataTransfer.EidPrayers.CreateLocation.PageLoad PageLoad(int id)
        {
            return DataAccess.EidPrayers.CreateLocation.PageLoad(id);
        }

        public static DataTransfer.FormOutput SaveLocation(DataTransfer.EidPrayers.CreateLocation.FormInput input)
        {
            var output = Validation.PerformBasicValidation(input);

            if (output.IsValid)
            {
                DataAccess.EidPrayers.CreateLocation.Save(input);
                output.IsSaved = true;
            }

            return output;
        }
    }
}
